![]() |
![]() |
![]() | |
![]() ![]() ![]() ![]()
╨Φ±εΓαφΦσ Γ εΩφσ |
╩εφ≥σΩ±≥ ε≥εß≡αµσφΦ╧≡ε∙σ Γ±σπε ∩≡σΣ±≥αΓΦ≥ⁿ ±σßσ Ωεφ≥σΩ±≥ ε≥εß≡αµσφΦ ΩαΩ ∩εδε≥φε, φα Ωε≥ε≡ε∞ ≡Φ±≤σ≥ ⌡≤ΣεµφΦΩ. ╥ε≈φε ≥αΩ µσ ΩαΩ ⌡≤ΣεµφΦΩ ∞εµσ≥ Γ√ßΦ≡α≥ⁿ Σδ ≡Φ±εΓαφΦ ≡ατδΦ≈φ√σ Φφ±≥≡≤∞σφ≥√, ∩≡επ≡α∞∞Φ±≥, ±ετΣα■∙ΦΘ α∩δσ≥ Java, ∞εµσ≥ Γ√ßΦ≡α≥ⁿ ≡ατδΦ≈φ√σ ∞σ≥εΣ√ Ωδα±±α Graphics Φ ταΣαΓα≥ⁿ ≡ατδΦ≈φ√σ α≥≡Φß≤≥√ Ωεφ≥σΩ±≥α ε≥εß≡αµσφΦ . ╠σ≥εΣ√ Ωδα±±α Graphics┬ Ωα≈σ±≥Γσ ßατεΓεπε Σδ Ωδα±±α Graphics (∩εδφεσ φατΓαφΦσ Ωδα±±α java.awt.Graphics) Γ√±≥≤∩ασ≥ Ωδα±± java.lang.Object. ╧≡σµΣσ Γ±σπε ∞√ ∩≡ΦΓσΣσ∞ ∩≡ε≥ε≥Φ∩√ Ωεφ±≥≡≤Ω≥ε≡α ²≥επε Ωδα±±α Φ σπε ∞σ≥εΣεΓ ± Ω≡α≥ΩΦ∞Φ Ωε∞∞σφ≥α≡Φ ∞Φ. ╧εδφεσ ε∩Φ±αφΦσ Γ√ ±∞εµσ≥σ φαΘ≥Φ Γ ²δσΩ≥≡εφφεΘ ΣεΩ≤∞σφ≥α÷ΦΦ, Ωε≥ε≡α Γ⌡εΣΦ≥ Γ Ωε∞∩δσΩ≥ Java WorkShop. ─αδσσ ∞√ ≡α±±∞ε≥≡Φ∞ φατφα≈σφΦσ ε±φεΓφ√⌡ ∞σ≥εΣεΓ, ±π≡≤∩∩Φ≡εΓαΓ Φ⌡ ∩ε Γ√∩εδφ σ∞√∞ ⌠≤φΩ÷Φ ∞. ╩εφ±≥≡≤Ω≥ε≡protected Graphics(); ╠σ≥εΣ√
╤≥Φ≡αφΦσ ±εΣσ≡µΦ∞επε ∩≡ ∞ε≤πεδⁿφεΘ εßδα±≥Φ public abstract void clearRect(int x, int y, int width, int height);
╟αΣαφΦσ εßδα±≥Φ επ≡αφΦ≈σφΦ Γ√ΓεΣα public abstract void clipRect(int x, int y, int width, int height);
╩ε∩Φ≡εΓαφΦσ ±εΣσ≡µΦ∞επε ∩≡ ∞ε≤πεδⁿφεΘ εßδα±≥Φ public abstract void copyArea(int x, int y, int width, int height, int dx, int dy);
╤ετΣαφΦσ Ωεφ≥σΩ±≥α ε≥εß≡αµσφΦ public abstract Graphics create(); public Graphics create(int x, int y, int width, int height);
╙ΣαδσφΦσ Ωεφ≥σΩ±≥α ε≥εß≡αµσφΦ public abstract void dispose();
╨Φ±εΓαφΦσ ∩≡ ∞ε≤πεδⁿφεΘ εßδα±≥Φ ± ≥≡σ⌡∞σ≡φ√∞ Γ√ΣσδσφΦσ∞ public void draw3DRect(int x, int y, int width, int height, boolean raised);
╨Φ±εΓαφΦσ ±σπ∞σφ≥α public abstract void drawArc(int x, int y, int width, int height, int startAngle, int arcAngle); ╨Φ±εΓαφΦσ ±σπ∞σφ≥α
╨Φ±εΓαφΦσ ≥σΩ±≥α Φτ ∞α±±ΦΓα ßαΘ≥ public void drawBytes(byte data[], int offset, int length, int x, int y);
╨Φ±εΓαφΦσ ≥σΩ±≥α Φτ ∞α±±ΦΓα ±Φ∞ΓεδεΓ public void drawChars(char data[], int offset, int length, int x, int y);
╨Φ±εΓαφΦσ ≡α±≥≡εΓεπε Φτεß≡αµσφΦ public abstract boolean drawImage(Image img, int x, int y, Color bgcolor, ImageObserver observer); public abstract boolean drawImage(Image img, int x, int y, ImageObserver observer); public abstract boolean drawImage(Image img, int x, int y, int width, int height, Color bgcolor, ImageObserver observer); public abstract boolean drawImage(Image img, int x, int y, int width, int height, ImageObserver observer);
╨Φ±εΓαφΦσ δΦφΦΦ public abstract void drawLine(int x1, int y1, int x2, int y2);
╨Φ±εΓαφΦσ εΓαδα public abstract void drawOval(int x, int y, int width, int height);
╨Φ±εΓαφΦσ ∞φεπε≤πεδⁿφΦΩα public abstract void drawPolygon( int xPoints[], int yPoints[], int nPoints); public void drawPolygon(Polygon p);
╨Φ±εΓαφΦσ ∩≡ ∞ε≤πεδⁿφΦΩα public void drawRect(int x, int y, int width, int height);
╨Φ±εΓαφΦσ ∩≡ ∞ε≤πεδⁿφΦΩα ± Ω≡≤πδ√∞Φ ≤πδα∞Φ public abstract void drawRoundRect( int x, int y, int width, int height, int arcWidth, int arcHeight);
╨Φ±εΓαφΦσ ≥σΩ±≥εΓεΘ ±≥≡εΩΦ public abstract void drawString(String str, int x, int y);
╨Φ±εΓαφΦσ τα∩εδφσφφεπε ∩≡ ∞ε≤πεδⁿφΦΩα ± ≥≡σ⌡∞σ≡φ√∞ Γ√ΣσδσφΦσ∞ public void fill3DRect(int x, int y, int width, int height, boolean raised);
╨Φ±εΓαφΦσ τα∩εδφσφφεπε ±σπ∞σφ≥α Ω≡≤πα public abstract void fillArc(int x, int y, int width, int height, int startAngle, int arcAngle);
╨Φ±εΓαφΦσ τα∩εδφσφφεπε εΓαδα public abstract void fillOval(int x, int y, int width, int height);
╨Φ±εΓαφΦσ τα∩εδφσφφεπε ∞φεπε≤πεδⁿφΦΩα public abstract void fillPolygon( int xPoints[], int yPoints[], int nPoints);
╨Φ±εΓαφΦσ τα∩εδφσφφεπε ∞φεπε≤πεδⁿφΦΩα public void fillPolygon(Polygon p); public abstract void fillRect(int x, int y, int width, int height);
╨Φ±εΓαφΦσ τα∩εδφσφφεπε ∩≡ ∞ε≤πεδⁿφΦΩα ± Ω≡≤πδ√∞Φ ≤πδα∞Φ public abstract void fillRoundRect( int x, int y, int width, int height, int arcWidth, int arcHeight);
╧≡ε±δσµΦΓαφΦσ Γ√τεΓα ∞σ≥εΣα dispose public void finalize();
╬∩≡σΣσδσφΦσ π≡αφΦ÷ εßδα±≥Φ επ≡αφΦ≈σφΦ Γ√ΓεΣα public abstract Rectangle getClipRect();
╬∩≡σΣσδσφΦσ ÷Γσ≥α, Γ√ß≡αφφεπε Γ Ωεφ≥σΩ±≥ ε≥εß≡αµσφΦ public abstract Color getColor();
╬∩≡σΣσδσφΦσ °≡Φ⌠≥α, Γ√ß≡αφφεπε Γ Ωεφ≥σΩ±≥ ε≥εß≡αµσφΦ public abstract Font getFont();
╬∩≡σΣσδσφΦσ ∞σ≥≡ΦΩ ≥σΩ≤∙σπε °≡Φ⌠≥α public FontMetrics getFontMetrics();
╬∩≡σΣσδσφΦσ ∞σ≥≡ΦΩ ταΣαφφεπε °≡Φ⌠≥α public abstract FontMetrics getFontMetrics(Font f);
╙±≥αφεΓΩα ÷Γσ≥α Σδ ≡Φ±εΓαφΦ Γ Ωεφ≥σΩ±≥σ ε≥εß≡αµσφΦ public abstract void setColor(Color c);
╙±≥αφεΓΩα ≥σΩ≤∙σπε °≡Φ⌠≥α Γ Ωεφ≥σΩ±≥σ ε≥εß≡αµσφΦ public abstract void setFont(Font font);
╙±≥αφεΓΩα ≡σµΦ∞α ≡Φ±εΓαφΦ ╠σ≥εΣ setPaintMode ≤±≥αφαΓδΦΓασ≥ Γ Ωεφ≥σΩ±≥σ ε≥εß≡αµσφΦ ≡σµΦ∞ ≡Φ±εΓαφΦ , ∩≡Φ Ωε≥ε≡ε∞ Γ√∩εδφ σ≥± τα∞σ∙σφΦσ Φτεß≡αµσφΦ ≥σΩ≤∙Φ∞ ÷Γσ≥ε∞, ≤±≥αφεΓδσφφε∞ Γ Ωεφ≥σΩ±≥σ ε≥εß≡αµσφΦ . public abstract void setPaintMode();
╙±≥αφεΓΩα ∞α±ΩΦ Σδ ≡Φ±εΓαφΦ ╟αΣαΓα ∞α±Ω≤ Σδ ≡Φ±εΓαφΦ ∩≡Φ ∩ε∞ε∙Φ ∞σ≥εΣα setXORMode, Γ√ ∞εµσ≥σ Γ√∩εδφΦ≥ⁿ ∩≡Φ ≡Φ±εΓαφΦΦ τα∞σ∙σφΦσ ≥σΩ≤∙σπε ÷Γσ≥α φα ÷Γσ≥, ≤Ωαταφφ√Θ Γ ∩α≡α∞σ≥≡σ ∞σ≥εΣα, Φ φαεßε≡ε≥, ÷Γσ≥α, ≤Ωαταφφεπε Γ ∩α≡α∞σ≥≡σ ∞σ≥εΣα, φα ≥σΩ≤∙ΦΘ. ┬±σ ε±≥αδⁿφ√σ ÷Γσ≥α Φτ∞σφ ■≥± φσ∩≡σΣ±Ωατ≤σ∞√∞ εß≡ατε∞, εΣφαΩε ²≥α ε∩σ≡α÷Φ εß≡α≥Φ∞α, σ±δΦ Γ√ φα≡Φ±≤σ≥σ ≥≤ µσ ±α∞≤■ ⌠Φπ≤≡≤ ΣΓα ≡ατα φα εΣφε∞ Φ ≥ε∞ µσ ∞σ±≥σ. public abstract void setXORMode(Color c1);
╤ΣΓΦπ φα≈αδα ±Φ±≥σ∞√ Ωεε≡ΣΦφα≥ ╠σ≥εΣ translate ±ΣΓΦπασ≥ φα≈αδε ±Φ±≥σ∞√ Ωεε≡ΣΦφα≥ Γ Ωεφ≥σΩ±≥σ ε≥εß≡αµσφΦ ≥αΩΦ∞ εß≡ατε∞, ≈≥ε εφε ∩σ≡σ∞σ∙ασ≥± Γ ≥ε≈Ω≤ ± Ωεε≡ΣΦφα≥α∞Φ (x, y), ταΣαφφ√∞Φ ≈σ≡στ ∩α≡α∞σ≥≡√ ∞σ≥εΣα: public abstract void translate(int x, int y);
╧εδ≤≈σφΦσ ≥σΩ±≥εΓεΘ ±≥≡εΩΦ, ∩≡σΣ±≥αΓδ ■∙σΘ Σαφφ√Θ Ωεφ≥σΩ±≥ ε≥εß≡αµσφΦ public String toString(); |